home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Point_Rect C++ Classes / MacObj.sit / MacObj ƒ / CPoint.h < prev    next >
Text File  |  1993-09-15  |  988b  |  52 lines

  1. /*
  2.  CPoint.h
  3.  
  4.         Interface for the Point Class
  5.  
  6. */
  7.  
  8. #pragma once
  9.  
  10. //
  11. // If the symbol _MACOBJ_SPEED is defined, the file CPoint.cp is included by this
  12. // header file and all methods are inlined.  Otherwise, CPoint.cp must be included
  13. // in your project and all methods are called as subroutines.
  14. //
  15.  
  16. #define _MACOBJ_SPEED
  17.  
  18. #include <Types.h>
  19. #include <QuickDraw.h>
  20.  
  21. class CPoint : public Point        // based on Mac Point structure
  22. {
  23. public:
  24.     // Constructors
  25.     CPoint();
  26.     CPoint(short ih, short iv);
  27.     CPoint(Point p);
  28.  
  29.     // Member functions
  30.     void Offset(short oh, short ov);
  31.     void Offset(Point p);
  32.  
  33.     // Quickdraw member functions
  34.     void Move(void);
  35.     void MoveTo(void);
  36.     void Line(void);
  37.     void LineTo(void);
  38.  
  39.     // Operators
  40.     Boolean operator==(Point p) const;
  41.     Boolean operator!=(Point p) const;
  42.     void operator+=(Point p);
  43.     void operator-=(Point p);
  44.     CPoint operator+(Point p) const;
  45.     CPoint operator-(Point p) const;
  46.     CPoint operator-() const;
  47.     
  48. };
  49.  
  50. #ifdef _MACOBJ_SPEED
  51. #include "CPoint.cp"
  52. #endif